{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "fa4f9d05",
   "metadata": {},
   "source": [
    "### 语言对话助手机器人\n",
    "> 1.语音识别ASR（将声音转化为文本） \n",
    ">> 1.1百度语音识别API  \n",
    "\n",
    "\n",
    "> 2.自然语言处理（理解文本-->文本生成）  \n",
    ">> 2.1自己构造字典，自定义回复信息  \n",
    "qa = {\n",
    "    \"你好\":\"你好呀，有什么事么？\",\n",
    "    \"你叫什么名字\":\"我是人见人爱，花见花开的小小度呀\",\n",
    "    \"你多大了\":\"这是很私密的问题，我今年18岁了。\",\n",
    "    \"苹果用英文怎么说\":\"apple\",\n",
    "    \"今天天气\":\"我这边墨迹天气显示，今天广州30度，晴\"\n",
    "}  \n",
    ">> 2.2 可以尝试接入有功能的自动回复机器人的API（图灵机器人API）  \n",
    ">> 2.3 可以尝试接入更加智能的语言生成模型（chatgpt、API、文心一言API等）\n",
    "\n",
    "> 3.语音合成TTS（将文本合成语音）  \n",
    ">> 3.1 在步骤2中生成的文本转换成语音（百度语音合成API）"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "96a142f2",
   "metadata": {},
   "source": [
    "\n",
    "qa = {\n",
    "    \"你好\":\"你好呀，有什么事么？\",\n",
    "    \"你叫什么名字\":\"我是人见人爱，花见花开的小小度呀\",\n",
    "    \"你多大了\":\"这是很私密的问题，我今年18岁了。\",\n",
    "    \"苹果用英文怎么说\":\"apple\",\n",
    "    \"今天天气\":\"我这边墨迹天气显示，今天广州30度，晴\"\n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5942d737",
   "metadata": {},
   "source": [
    "### 文本自动回复（自定义）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "4fc31dbc",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "qa = {\n",
    "    \"你好\":\"你好呀，有什么事么？\",\n",
    "    \"你叫什么名字\":\"我是人见人爱，花见花开的小小度呀\",\n",
    "    \"你多大了\":\"这是很私密的问题，我今年18岁了。\",\n",
    "    \"苹果用英文怎么说\":\"apple\",\n",
    "    \"今天天气\":\"我这边墨迹天气显示，今天广州30度，晴\"\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "6f906449",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'你好呀，有什么事么？'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qa.get('你好')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "918f7df9",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
